<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- hello啊，树哥！ -->
        <hello-world></hello-world>
    </div>
    <script>
        Vue.component('hello-world', {
            template: '<h1>{{ content }}</h1>',
            data() {
                return {
                    content: 'hello 啊 ，组件'
                }
            }
        })

        const vm = new Vue({
            el: '#app',
            data: {
                money: 1000000
            },
            components: {
                helloWorld: {
                    template: '<h1>{{ content }}</h1>',
                    data() {
                        return {
                            content: 'hello 啊 ，组件'
                        }
                    }
                }
            }
        })
    </script>
</body>

</html>